package contest1608;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;


public class J {

    static Scanner cin = new Scanner(new BufferedInputStream(System.in));//大量输入优化版本
    static PrintWriter cout = new PrintWriter(new BufferedOutputStream(System.out));//大量输出优化版本
    static PrintWriter cerr = new PrintWriter(System.err, true);//开启调试模式,一般输出量不大，不需要buffered

    static void quickSort(int[] a, int left, int right) {
        if (left >= right) return;
        int pivot = a[left], i = left, j = right;
        while (i < j) {
            while (j > i && a[j] >= pivot) --j;
            while (i < j && a[i] <= pivot) ++i;
            if (i == j) break;
            int t = a[i];
            a[i] = a[j];
            a[j] = t;
        }
        int t = a[i];
        a[i] = a[left];
        a[left] = t;
        quickSort(a, left, i - 1);
        quickSort(a, i + 1, right);
    }

    public static void main(String[] args) {
        //TODO AOJ开启你的ACM传奇人生
        cerr.println("-----Start your ACM legendary life with AOJ(www.webturing.com)----");
        int n = cin.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = cin.nextInt();
        }
        quickSort(a, 0, a.length - 1);
        for (int each : a) {
            cout.print(each + " ");
        }

        cin.close();//关闭输入流
        cout.close();//关闭输出流，这是必须的，否则一般不会自动刷新缓冲区
    }
}

